<?php

namespace App\Http\Controllers\Guest;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Storage;

class RetroshareController extends Controller
{
    public function index()
    {
        return view('retroshare', ['title' => 'RS']);
    }

    public function store(Request $request)
    {
        $key = Config::get('i2p.rs');
        Storage::append('public/rs.txt', $request->key . "\n");
        return view('retroshare', ['title' => 'RS', 'key' => $key]);
    }
}
